<!--  -->
<template>
  <transition name="toast">
    <div class="cm-toast" v-if="show">
      <div class="toast-icon">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-cmnews"></use>
        </svg>
      </div>
      <span class="toast-content">{{ message }}</span>
    </div>
  </transition>
</template>

<script>
export default {
  data() {
    return {
    };
  },

  props: ["message","show"],

  components: {
  },

  computed: {

  },

  methods: {
  },
  created() {
  },
};
</script>
<style>
.cm-toast {
  top: 10px;
  position: fixed;
  padding: 10px 7px;
  min-height: 20px;
  max-width: 18%;
  border-radius: 4px;
  background-color: white;
  margin-top: 20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 15px 25px,
    rgba(0, 0, 0, 0.05) 0px 5px 10px;
}
.cm-toast > .toast-icon {
  position: absolute;
  left: 20px;
  top: 10px;
}
.cm-toast > .toast-icon > .icon {
  font-size: 16px;
}
.cm-toast > .toast-content {
  position: relative;
  padding-left: 40px;
  padding-right: 13px;
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
  word-wrap: break-word;
  display: block;
}
.toast-enter-active {
  animation: toastenter 0.3s ease;
}
@keyframes toastenter {
  from {
    top: -50px;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
</style>